<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <h1>五位数中，对称的数称为回文数，找出所有的回文数</h1>
</body>
<script>
    document.write('五位数中回文数：')
    var m = 0;
    for (var i = 10000; i <= 99999; i++) {

        var st = ""
        st = i.toString();

        if (st[0] == st[4] && st[1] == st[3]) {

            m++;
            document.write(i + '&nbsp&nbsp&nbsp&nbsp');
            if (m % 10 == 0) {
                document.write('<br>');
            }
        }
    }
</script>

</html>